var mongoose = require("mongoose");

var Schema = mongoose.Schema;

var videosSchema = new Schema(
  {
    videoid: { type: String, default: "" },
    userid: { type: String, default: "" },
    src: { type: String, default: "" },
    publictime: { type: String, default: "" },
    likeNum: { type: Number, default: 0 },
    playcount: { type: Number, default: 0 },
    introduce: { type: String, default: "" },
    comments: { type: Array, default: [] },
    poster: { type: String, default: "" },
    position: { type: Object, default: {} },
    choosenVideoLabel: { type: Array, default: [] },
    baseUrl: { type: String, default: "http://127.0.0.1:3000" },
    isEffective: { type: Boolean, default: true },
  },
  { versionKey: false }
);

var videosModel = mongoose.model("videos", videosSchema);

module.exports = videosModel;
